#ifndef __DIRECTORLOADER_H__
#define __DIRECTORLOADER_H__

namespace DirectorLoader
{
	// DIrector Properties
	static const float 	BASE_PERIOD = 15.0;				// seconds passed before next update
	static const int 	BASE_DECREMENT = 2;				// difficulty decrement when damaged
	static const int	CAT_SPAWN_MIN_THRESHOLD = 20;	// Difficulty amount to focus on cat spawn
	static const int	CAT_SPAWN_MAX_THRESHOLD = 60;	// Difficulty amount to focus on cat spawn
	static const double	CAT_SPAWN_WEIGHT = 0.5;			// Difficulty contribution for cat spawn
	static const int	CAT_PROPERTIES_THRESHOLD = 50;	// Difficulty amount to focus on cat properties

	// Player performance
	static const float PLAYER_PERFORMANCE_Y1 = 1.0;		// y-pos in eqn
	static const float PLAYER_PERFORMANCE_Y2 = 7.0;

	static const float PLAYER_PERFORMANCE_X1 = 0.5;		// x-pos in eqn
	static const float PLAYER_PERFORMANCE_X2 = 1.5;

	static const float PLAYER_PERFORMANCE_GAME_Y1 = 1.0;	// y-pos in eqn
	static const float PLAYER_PERFORMANCE_GAME_Y2 = 5.0;

	// Maximum difficulty corresponds to weight * Cat properties threshold
	// X1 represents the minimum value

	// Cat obstacle, y = ke^-x + c
	// Difficulty level is an negative-exponential curve, y-axis 1 ~ 70, x-axis 0.1~0.7
	static const float CAT_OBSTACLE_Y1 = CAT_PROPERTIES_THRESHOLD;	// y-pos in eqn
	static const float CAT_OBSTACLE_Y2 = 1.0;

	static const float CAT_OBSTACLE_X1 = 0.1;	// x-pos in eqn, chance/100
	static const float CAT_OBSTACLE_X2 = 0.7;

	// Cat Speed, y = ke^x + c
	// Difficulty level is an exponential curve, y-axis 35 ~ 70, x-axis 1~1.5
	static const float CAT_SPEED_Y1 = 15.0;	// y-pos in eqn
	static const float CAT_SPEED_Y2 = CAT_PROPERTIES_THRESHOLD;

	static const float CAT_SPEED_X1 = 1.0;	// x-pos in eqn, speed multiplier
	static const float CAT_SPEED_X2 = 1.7;

	// Character Obstacle, y = ke^x + c
	// Difficulty level is an exponential curve, y-axis 35 ~ 70, x-axis 0.05~0.3
	static const float CHAR_OBSTACLE_Y1 = 15.0;	// y-pos in eqn
	static const float CHAR_OBSTACLE_Y2 = CAT_PROPERTIES_THRESHOLD;

	static const float CHAR_OBSTACLE_X1 = 0.05;	// x-pos in eqn, chance multiplier/100
	static const float CHAR_OBSTACLE_X2 = 0.3;

	// Character Speed, y = ke^-x + c
	// Difficulty level is an negative-exponential curve, y-axis 35 ~ 70, x-axis 0.7~1.0
	static const float CHAR_SPEED_Y1 = CAT_PROPERTIES_THRESHOLD;	// y-pos in eqn
	static const float CHAR_SPEED_Y2 = 15.0;

	static const float CHAR_SPEED_X1 = 0.8;	// x-pos in eqn, speed multiplier
	static const float CHAR_SPEED_X2 = 1.0;

	// Number of Cat Multiplier, y = kx + c
	// Difficulty level is an straight line, y-axis 0 ~ 50, x-axis 1.0~2.0
	static const float NUM_CAT_MULTIPLIER_Y1 = 0.0;	// y-pos in eqn
	static const float NUM_CAT_MULTIPLIER_Y2 = 50.0;

	static const float NUM_CAT_MULTIPLIER_X1 = 1.0;	// x-pos in eqn, speed multiplier
	static const float NUM_CAT_MULTIPLIER_X2 = 2.0;

	// Interval Multiplier, y = -kx + c
	// Difficulty level is an straight line, y-axis 50 ~ 0, x-axis 0.5~1.0
	static const float INTERVAL_MULTIPLIER_Y1 = 50.0;	// y-pos in eqn
	static const float INTERVAL_MULTIPLIER_Y2 = 0.0;

	static const float INTERVAL_MULTIPLIER_X1 = 0.5;	// x-pos in eqn, speed multiplier
	static const float INTERVAL_MULTIPLIER_X2 = 1.0;

	// Get value for positive log graph equation, , y = ke^x + c
	float getPosLogVarK(float pointY1, float pointY2, float pointX1, float pointX2);
	float getPosLogVarC(float varK, float pointY1, float pointX1);
	float getPosLogXValue(float varK, float varC, float varY);
	float getPosLogYValue(float varK, float varC, float varY);

	// Get value for negative log graph equation, , y = ke^-x + c
	float getNegLogVarK(float pointY1, float pointY2, float pointX1, float pointX2);
	float getNegLogVarC(float varK, float pointY1, float pointX1);
	float getNegLogValue(float varK, float varC, float varY);

	// Get value for positive straight line graph, y = kx + c
	float getPosLineVarK(float pointY1, float pointY2, float pointX1, float pointX2);
	float getPosLineVarC(float varK, float pointY1, float pointX1);
	float getPosLineValue(float varK, float varC, float varY);

	// Get value for positive straight line graph, y = -kx + c
	float getNegLineVarK(float pointY1, float pointY2, float pointX1, float pointX2);
	float getNegLineVarC(float varK, float pointY1, float pointX1);
	float getNegLineValue(float varK, float varC, float varY);

};

#endif // __DIRECTORLOADER_H__
